package com.tl.app.service.impl;

import java.util.List;
import com.tl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tl.app.mapper.AppAccountLogMapper;
import com.tl.app.domain.AppAccountLog;
import com.tl.app.service.IAppAccountLogService;

/**
 * 用户流水Service业务层处理
 * 
 * @author suhp
 * @date 2024-07-07
 */
@Service
public class AppAccountLogServiceImpl implements IAppAccountLogService 
{
    @Autowired
    private AppAccountLogMapper appAccountLogMapper;

    /**
     * 查询用户流水
     * 
     * @param id 用户流水主键
     * @return 用户流水
     */
    @Override
    public AppAccountLog selectAppAccountLogById(Long id)
    {
        return appAccountLogMapper.selectAppAccountLogById(id);
    }

    /**
     * 查询用户流水列表
     * 
     * @param appAccountLog 用户流水
     * @return 用户流水
     */
    @Override
    public List<AppAccountLog> selectAppAccountLogList(AppAccountLog appAccountLog)
    {
        return appAccountLogMapper.selectAppAccountLogList(appAccountLog);
    }

    /**
     * 新增用户流水
     * 
     * @param appAccountLog 用户流水
     * @return 结果
     */
    @Override
    public int insertAppAccountLog(AppAccountLog appAccountLog)
    {
        appAccountLog.setCreateTime(DateUtils.getNowDate());
        return appAccountLogMapper.insertAppAccountLog(appAccountLog);
    }

    /**
     * 修改用户流水
     * 
     * @param appAccountLog 用户流水
     * @return 结果
     */
    @Override
    public int updateAppAccountLog(AppAccountLog appAccountLog)
    {
        return appAccountLogMapper.updateAppAccountLog(appAccountLog);
    }

    /**
     * 批量删除用户流水
     * 
     * @param ids 需要删除的用户流水主键
     * @return 结果
     */
    @Override
    public int deleteAppAccountLogByIds(Long[] ids)
    {
        return appAccountLogMapper.deleteAppAccountLogByIds(ids);
    }

    /**
     * 删除用户流水信息
     * 
     * @param id 用户流水主键
     * @return 结果
     */
    @Override
    public int deleteAppAccountLogById(Long id)
    {
        return appAccountLogMapper.deleteAppAccountLogById(id);
    }
}
